package com.example.yoho.mvp.view.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.yoho.R;
import com.example.yoho.domain.Domain_Url;
import com.example.yoho.mvp.model.entity.ShoesBean;
import com.example.yoho.utils.MyGlide;

import java.util.List;

public class MyUfoAdapter extends BaseQuickAdapter<ShoesBean.ValuesBean, BaseViewHolder> {
    public MyUfoAdapter(int layoutResId, @Nullable List<ShoesBean.ValuesBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShoesBean.ValuesBean item) {
        TextView textView_ufoprice=helper.getView(R.id.ufo_price);
        TextView textView_ufoname=helper.getView(R.id.ufo_name);
        ImageView imageView_ufo_image=helper.getView(R.id.ufo_image);
        textView_ufoprice.setText("￥"+item.getGoods_discount_price());
        textView_ufoname.setText(item.getGoods_name());
        MyGlide.GlideFor(mContext, Domain_Url.IMAGE_URL+item.getGoods_img_path(),imageView_ufo_image);
    }
}
